package cn.exrick.xboot.modules.activiti.entity.business;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author 李健
 */
@Data
@Entity
@Table(name = "t_event_report")
@TableName("t_event_report")
@ApiModel(value = "事件上报")
public class EventReport extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "关联流程申请表id")
    private String actBusinessId;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "申请用户")
    private String applyUser;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "表单路由名")
    private String routeName;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "流程实例id")
    private String procInstId;

    @Transient
    @TableField(exist=false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提交申请时间")
    private Date applyTime;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "状态 0草稿默认 1处理中 2结束")
    private Integer status;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "结果状态 0未提交默认 1处理中 2通过 3驳回")
    private Integer result;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "部门ID")
    private String departs;

    @ApiModelProperty(value = "事件编码")
    private String eventNum;

    @ApiModelProperty(value = "事件来源")
    private String eventSource;

    @ApiModelProperty(value = "事件类型")
    private String eventType;

    @ApiModelProperty(value = "河流名称")
    private String riverName;

    @ApiModelProperty(value = "河流ID")
    private String riverId;

    @ApiModelProperty(value = "事件描述")
    private String eventDescribe;

    @ApiModelProperty(value = "发生地点")
    private String locality;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "开始日期")
    private Date startDate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "截止日期")
    private Date endDate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "任务结束时间")
    private Date taskEndTime;

    @ApiModelProperty(value = "处理前图片")
    private String front;

    @ApiModelProperty(value = "处理时图片")
    private String middle;

    @ApiModelProperty(value = "处理后图片")
    private String later;

    @ApiModelProperty(value = "经度")
    private String lng;

    @ApiModelProperty(value = "纬度")
    private String lat;
}